package demo10;

import java.util.Scanner;

public class test5 {
    public static void main(String[] args) {
        //键盘录入
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
//        int i = sc.nextInt();
//        System.out.println(i);
        //避免遇到空格就转到下一个，一行一行的录入
        String line =sc.nextLine();
        System.out.println(line);

//        int i = Integer.parseInt(line);
//        System.out.println(i);

        double v = Double.parseDouble(line);
        System.out.println(v);

    }
}
